home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10256 < prev    next >
Encoding:
Text File  |  1996-08-05  |  675 b   |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: peer-news.britain.eu.net!liv!news
  3. From: nickc@liv.ac.uk (Spider plant breeding program)
  4. Subject: () syntax for constructor for an array?
  5. Message-ID: <NICKC.96Mar7121149@uxe.liv.ac.uk>
  6. Sender: news@liverpool.ac.uk (News System)
  7. Nntp-Posting-Host: uxe.liv.ac.uk
  8. Organization: M-6 M-4 M-x hanoi
  9. Date: Thu, 7 Mar 1996 12:11:49 GMT
  10.  
  11. I can initalise an array with:
  12.  
  13. float f[2] = { 2.718, 3.142 };
  14.  
  15.  
  16. Is there some form of C++ syntax that can be used in a constructor - ie:
  17.  
  18.  
  19. class a
  20. {
  21.   float f[2];
  22.  
  23. public:
  24.   a() : f( /* What goes in here ? */ )
  25.   {};
  26. };
  27.  
  28.  
  29. Thanks in advance for your help,
  30.  
  31. Nicholas Clark
  32.  
  33. -- 
  34. C:\> ECHO f 0000:0000 ffff 66 | DEBUG
  35.